-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[doc] full generator details #4941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @OpenAPITools/generator-core-team @OpenAPITools/openapi-generator-collaborators |
|
@jimschubert could you also add:
|
|
@spacether additional properties aren't evaluated until processOpts (the |
|
I added more details to #1811 about the options we can only get from the |
|
@jimschubert are you sure? |
|
@spacether what you've linked to is CLI options which were already documented before this PR (the Additional Properties are different. It's a map of options which holds values usually including CLI options, plus others that can only be determined after the generate command and subsequently Line 184 in a2532cc
For better examples of why it would only be helpful to dump these from generate, see the following generators which set additionalProperties and/or supportingFiles based on user inputs: Also, another example of how vendor extensions (those we apply for our tooling) will only be known after the generate command:
There may be opportunities for CLI options, although we do already output defaults and the CLI option type itself outputs available enum information. I would think any confusion here might be generator specific, like if a generator has a set of values but doesn't define them as an enum but rather a freeform string. I apologise for any confusion, but I didn't realize folks considered CLI options to also be additional properties. I think it's only coincidental that they usually end up there. |
|
Thank you for explaining that. I didn't understand how all of those were related. |
|
Also people don't necessarily know about this link that you pointed us to. |
|
Forgot to mention, we do already document how to pass multiple additional properties.. see https://openapi-generator.tech/docs/usage#additional-properties I don't know if it makes sense to double-document this, or to add a link to this on the config page. These are generator specific details, while how to define additional properties is tool specific. That is, it's different for CLI, Maven plugin, Gradle Plugin, Online, and the Bazel Plugin. I think we can safely assume that people can find those docs easily via the doc site. If people are navigating docs in GitHub, If we cross-link, I'm pretty sure it won't work in docusaurus unless it's a full http link, and that will introduce weird navigation for those using GitHub. |
I'm not sure how to solve for that. The project follows a pretty standard pattern of putting documentation under the Do you mean people using CLI don't know to look here? This is why I've added the same info as above to the
I don't understand the comment. I'll assume you mean the doc page in the screenshot should link to this markdown page? Our doc site, which is linked in the README and GitHub repo description, uses docusaurus to build the site from the markdown under It's this site generation which is the ultimate reason for those markdown files to exist. However, for docusaurus to build it's graph of cross-links, the markdown files have to be registered in a specific way. These generated markdown files can't be registered in the expected way because docusaurus isn't great at files in nested directories. So, to link from these back to other doc pages, it would have to be the full doc site URL rather than a relative link (which works in all other markdown pages since they're not nested in directories). That's the background for my above comment about making for weird navigation in GitHub. I hope that clarifies (and was on point for your comment). As always, I'm open for suggestions to improve things. |
|
Thank you for clarifying and explaining this.
Thank you for your patience and the thorough explanation of the changes that you made and how our repo and the docs site works |
* master: (187 commits) [core] Initial FeatureSet structures and definitions (OpenAPITools#3614) Add Cisco to the user list (OpenAPITools#4971) comment out php slim4 in ensure-up-to-date update samples [Python] Allow models to have properties of type self (OpenAPITools#4888) Add npmRepository option to javascript generators (OpenAPITools#4956) [Slim4] Add ref support to Data Mocker (OpenAPITools#4932) Fix auto-labeler for jax-rs (OpenAPITools#4943) [doc] full generator details (OpenAPITools#4941) comment out python flask 2 test (OpenAPITools#4949) [jaxrs-spec][quarkus] update to version 1.1.1.Final (OpenAPITools#4935) [cli] Full config help details (OpenAPITools#4928) Add RequestFile to typescript-node model template (OpenAPITools#4903) [csharp] enum suffix changes enumValueNameSuffix to enumValueSuffix (OpenAPITools#4927) [C#] allow customization of generated enum suffixes (OpenAPITools#4301) [Kotlin] Correct isInherited flag for Kotlin generators (OpenAPITools#4254) [Rust Server] Fix panic handling headers (OpenAPITools#4877) Initial CODEOWNERS (OpenAPITools#4924) [scala] Support for Set when array has uniqueItems=true (OpenAPITools#4926) remove nodejs server samples, scripts (OpenAPITools#4919) ...
Looking for feedback on adding this to docs. It's a lot of additional text.
ulelements will be single-column in github, but displayed as expected in our doc site.PR checklist
./bin/(or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).master,4.3.x,5.0.x. Default:master.